<ion-view cache-view="false" hide-back-button="true" title="二手市场">
  <ion-nav-buttons side="left">
    <a class="button button-clear" ng-click="goBack()">
      <i class="icon ion-chevron-left"></i>
    </a>
  </ion-nav-buttons>
  <ion-nav-buttons side="right">
    <a class="button button-clear" ng-click="addComment()">
      <i class="icon ion-ios-plus-outline"></i>
    </a>
  </ion-nav-buttons>
  <ion-content>
    <div class="list">
      <div class="item item-avatar">
        <img src="img/hd/pic_tx_b.png">
        <h2 style="color: #737373" ng-if="second.user.name">{{second.user.name}}</h2>
        <h2 style="color: #737373" ng-if="!second.user.name">匿名</h2>
        <p style="color: #b3b3b3">{{second.createtime | limitTo: 11}}</p>
      </div>
      <div class="item" ui-sref="form.secondhand">
        <p style="font-size: 16px; white-space:normal ">{{second.content}}</p>
        <div class="row" ng-if="second.imgurl1">
          <div class="col col-33" ng-if="second.imgurl1">
            <img alt="" ng-src="{{second.imgurl1}}" style="width: 100%; max-height: 90px">
          </div>
          <div class="col col-33" ng-if="second.imgurl2">
            <img alt="" ng-src="{{second.imgurl2}}" style="width: 100%; max-height: 90px">
          </div>
          <div class="col col-33" ng-if="second.imgurl3">
            <img alt="" ng-src="{{second.imgurl3}}" style="width: 100%; max-height: 90px">
          </div>
        </div>
      </div>
      <div class="item" style="color: #d20b19">
        评论
      </div>
      <div class="item item-avatar" ng-repeat="comment in comments | orderBy: createtime" ng-click="addComment(comment)">
        <img ng-if="!comment.from_user.headimg" src="img/hd/pic_tx_b.png">
        <img ng-if="comment.from_user.headimg" ng-src="{{comment.from_user.headimg}}">
        <h2 style="color: #737373;float: left">{{comment.from_user.name}}</h2>
        <span style="color: #737373; float: right; font-size: 13px">{{comment.createtime}}</span>
        <div style="clear:both"></div>
        <p style="color: #898989; white-space:normal">
          <span ng-if="comment.to_user">
            回复
            <span class="main-color">{{comment.to_user.name}}</span>:
          </span>
          {{comment.content}}
        </p>
      </div>
    </div>
  </ion-content>
</ion-view>
